package com.yedean.mall.controller;

import com.yedean.mall.api.CommonResult;
import com.yedean.mall.entity.UmsMemberLevel;
import com.yedean.mall.service.IUmsMemberLevelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * UmsMemberLevelController
 *
 * @author yedean
 * @date 2022/8/8
 */
@Api(tags = "会员等级管理")
@RequestMapping("/admin/memberLevel")
@RestController
public class UmsMemberLevelController {
    
    @Autowired
    IUmsMemberLevelService memberLevelService;
    
    @GetMapping("/list")
    @ApiOperation("查询所有会员等级")
    public CommonResult<List<UmsMemberLevel>> list(@RequestParam("defaultStatus") Integer defaultStatus) {
        List<UmsMemberLevel> memberLevelList = memberLevelService.list();
        return CommonResult.success(memberLevelList);
    }
    
    
}
